package com.thekernel.utils;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DbUtils {

	public static Connection createConn() {
		Connection conn = null;
		String url ="jdbc:mysql://localhost:3306/admin?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC";
		String uid = "root";
		String pwd = "123456";
		String clsname="com.mysql.jdbc.Driver";
		try {
			Class.forName(clsname);
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		try {
			conn=DriverManager.getConnection(url,uid,pwd);
		}catch(SQLException e) {
			e.printStackTrace();
		}
		return conn;
	}

}
